import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)


// 公共路由
export const constantRoutes = [
    
    {
        path: "/",
        name: "Home",
        component: () => import ("../views/Home.vue"),
        children: [
            {
                path: "/",
                name: "homePage",
                meta: {
                    title: '系统首页'
                },
                component: () => import ("../views/homePage.vue")
            },
            {
                path: "/dataDetail",
                name: "dataDetail",
                meta: {
                    title: '数据详情'
                },
                component: () => import ("../views/dataDetail.vue")
            },
            {
                path: "/graphPage",
                name: "graphPage",
                meta: {
                    title: '数据图谱'
                },
                component: () => import ("../views/graphPage.vue")
                // component: () => import ("../views/graphPageNoJson.vue")
            },
        ]
    },
    
]

export default new Router({
    // mode: 'history',
    routes: constantRoutes
})
